using System;
using System.Collections.Generic;
using TimeTableManagement.Models;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using System.Web.SessionState;
namespace TimeTableManagement.Entities
{
    /// <summary>
    /// Lớp ánh xạ cho đối tượng user khi logo
    /// </summary>
    public class Tb_Userlogin
    {
        public int id { get; set; }
        [Required]
        [Display(Name = "User Name")]
        public string username { get; set; }
        [Required]
        [DataType(DataType.Password)]
        [Display(Name = "Password")]
        public string password { get; set; }
        [Required]
        [Display(Name = "Role Name")]
        public int id_role { get; set; }
        [Display(Name = "Remember me?")]
        public bool rememberme { get; set; }
        public virtual Tb_Role Tb_Role { get; set; }
        [Display(Name = "Display Name")]
        public string displayname { get; set; }
        [Display(Name = "Email")]
        public string email { get; set; }

    }
    public class ChangePasswordModel
    {
        [Required]
        [DataType(DataType.Password)]
        [Display(Name = "Current password")]
        public string OldPassword { get; set; }

        [Required]
        [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "New password")]
        public string NewPassword { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "Confirm new password")]
        [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
        public string ConfirmPassword { get; set; }
    }
    public class ResetPassword
    {
        [Required]
        [Display(Name = "Username")]
        public string username { get; set; }

        [Required]
        [DataType(DataType.EmailAddress)]
        [Display(Name = "And Email")]
        public string email { get; set; }
    }
}

